function [ne,dc,sa,ns,sw,bcL,bcR,k,j] = probdata(problem,ne)
% function [ne,dc,sa,ns,sw,bcL,bcR,k,j] = probdata(arg)
% This function returns the desired problem data.  Input variable
% 'problem' tells which of a set of problems shall be run.  If arg = 0, 
% then the file 'name' is read.  Currently, that reader is not implemented.
    
if problem == 1
    %------------------------------------------------------------------
    % SAMPLE PROBLEM  # 1
    %  - two slabs of the same material
    %  - zero re-entrant current
    % FDM solution yields k ~ 1.002; here, we get 1.0022
    ne = 2;                     % number of elements
    dc = [ 4.000  4.000 ];      % diffusion coefficient      [cm^2]
    sa = [ 0.100  0.100 ];      % absorption cross-section   [1/cm^2]
    ns = [ 0.200  0.200 ];      % nu * fission cross-section [1/cm^2]
    sw = [ 4.247  4.247 ];      % slab width                 [cm]
    bcL = 0;                    % left boundary condition
    bcR = 0;                    % right boundary condition
    k = 1.00;                   % initial guess of keff
    j = ones(1,ne*2);           % initial guess for currents
    %------------------------------------------------------------------
elseif problem == 2
    %------------------------------------------------------------------
    % SAMPLE PROBLEM  # 2
    %  - five element, infinite core, |mod|f1|mod|f2|mod|
    %  - refected bc's
    % FDM solution yields k ~ 1.0104; here, we get k ~ 1.0102
    ne = 5;
    dc = [ 0.200  0.650  0.200  0.600  0.200  ];
    sa = [ 0.020  0.140  0.030  0.150  0.020  ];
    ns = [ 0.000  0.175  0.000  0.170  0.000  ];
    sw = [ 2.000  2.500  3.000  2.500  2.000  ];
    bcL = 1;
    bcR = 1;
    k = 1.;
    j = ones(1,ne*2);
    %------------------------------------------------------------------
elseif problem == 3
    % SAMPLE PROBLEM # 3
    %  - multi-element, finite core
    %ne = 800;
    mxel = 1000;
    tmp = ones(mxel,1); dc = tmp; sa = tmp; ns = tmp; sw = tmp;
    dc(1:2:mxel,1) = 0.257;    dc(2:2:mxel,1) = 0.704;
    sa(1:2:mxel,1) = 0.020;    sa(2:2:mxel,1) = 0.138;
    ns(1:2:mxel,1) = 0.00;    ns(2:2:mxel,1) = 0.153;
    sw(1:2:mxel,1) = 1.250;    sw(2:2:mxel,1) = 1.574;
    bcL = 0;
    bcR = 0;
    k = 1.00;
    j = ones(1,ne*2);
elseif problem == 4
    % SAMPLE PROBLEM # 4
    %  - multi-element, random media
    ne = 400;
    mxel = 500;
    tmp = ones(mxel,1); dc = tmp; sa = tmp; ns = tmp; sw = tmp;
    dc(1:2:mxel) = (rand(mxel/2,1)-.5)*.24/10+.24;
    dc(2:2:mxel) = (rand(mxel/2,1)-.5)*.66/10+.66;
    sa(1:2:mxel) = (rand(mxel/2,1)-.5)*.02/10+.02;
    sa(2:2:mxel) = (rand(mxel/2,1)-.5)*0.134/2+0.139;
    ns(1:2:mxel) = .0;
    ns(2:2:mxel) = (rand(mxel/2,1)-.5)*0.154/2+0.154;
    sw(1:2:mxel,1) = 1.25;    sw(2:2:mxel,1) = 1.587;
    bcL = 0;
    bcR = 0;
    k = 1.00;
    j = ones(1,ne*2);    
end